<template>
	<div>
		
		<el-table  :data="list"
			 border  
			 style="width: 100%"
			>
			<el-table-column  label="内容"   >
			     <template slot-scope="scope">
			        <div>
						<div v-for="(el,i) in scope.row.content" :key="i">
							<span>
								{{el.title}}:
							</span>
							<span style="color: red;">
								{{el.value}}
							</span>
						</div>
					</div>
			     </template>
			 </el-table-column>
			<el-table-column   align="center"    prop="add_time"    label="添加时间"></el-table-column>
			<el-table-column   align="center"    prop="update_time"    label="修改时间"></el-table-column>
		   
		</el-table>
		<div class="page">
		    <el-pagination
		            background
		            @size-change="pageChange"
		            @current-change="handleCurrentChange"
		            :current-page="page"
		            :page-size="pageSize"
		            layout="total, sizes, prev, pager, next, jumper"
		            :total="page_totle">
		    </el-pagination>
		</div>
		
		
		
	</div>
</template>

<script>
	
	export default {
		data(){
			return {
				codeShow:false,
				title:"",
				page:1,
				pageSize:10,
				table_name:'sub_value'
			}
		},
		components:{
			
		},
		
		mounted() {
			this.lodeList()
		},
		methods:{
			
			lodeList(){
				let params = {
					table_name:this.table_name,
					page:this.page,
					pageSize:this.pageSize
				}
				this.$post('/base/baseSelect',params,res=>{
					let data = res.data.data
					this.page_totle = data.count
					this.list = data.result
					for(let item of this.list){
						item.content = JSON.parse(item.content)
					}
				})
			},
		}
	}
</script>

<style>
</style>